<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-CPP: TRect类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-CPP
   </div>
   <div id="projectbrief">AWTK CPP API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="class_t_rect-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">TRect类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="awtk__cpp_8hpp_source.html">awtk_cpp.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:acc37f944de4ddf959fdd28b428ca6c60"><td class="memItemLeft" align="right" valign="top"><a id="acc37f944de4ddf959fdd28b428ca6c60"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TRect</b> (rect_t *nativeObj)</td></tr>
<tr class="separator:acc37f944de4ddf959fdd28b428ca6c60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9264e8f035db72dae095b79985569cb"><td class="memItemLeft" align="right" valign="top"><a id="aa9264e8f035db72dae095b79985569cb"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TRect</b> (const rect_t *nativeObj)</td></tr>
<tr class="separator:aa9264e8f035db72dae095b79985569cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac5098b9e4d7d0ec58b1b1924a79c2a3a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_t_rect.html">TRect</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_rect.html#ac5098b9e4d7d0ec58b1b1924a79c2a3a">Set</a> (xy_t x, xy_t y, wh_t w, wh_t h)</td></tr>
<tr class="separator:ac5098b9e4d7d0ec58b1b1924a79c2a3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d8fece5673f095d16ce6148c69b817c"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_rect.html#a4d8fece5673f095d16ce6148c69b817c">Destroy</a> ()</td></tr>
<tr class="separator:a4d8fece5673f095d16ce6148c69b817c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9cc205c171035f79f00570531b5047fa"><td class="memItemLeft" align="right" valign="top">xy_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_rect.html#a9cc205c171035f79f00570531b5047fa">GetX</a> () const</td></tr>
<tr class="separator:a9cc205c171035f79f00570531b5047fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a939ed8acb2164f5c36c24df11a2167ae"><td class="memItemLeft" align="right" valign="top">xy_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_rect.html#a939ed8acb2164f5c36c24df11a2167ae">GetY</a> () const</td></tr>
<tr class="separator:a939ed8acb2164f5c36c24df11a2167ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31ee91aae879a629ad590f1e47c0b8ee"><td class="memItemLeft" align="right" valign="top">wh_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_rect.html#a31ee91aae879a629ad590f1e47c0b8ee">GetW</a> () const</td></tr>
<tr class="separator:a31ee91aae879a629ad590f1e47c0b8ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab646b7cab0305a5e75cbe7d4c4c97e36"><td class="memItemLeft" align="right" valign="top">wh_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_rect.html#ab646b7cab0305a5e75cbe7d4c4c97e36">GetH</a> () const</td></tr>
<tr class="separator:ab646b7cab0305a5e75cbe7d4c4c97e36"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a80aa768986a8de358a4a529d2d971f0d"><td class="memItemLeft" align="right" valign="top"><a id="a80aa768986a8de358a4a529d2d971f0d"></a>
static <a class="el" href="class_t_rect.html">TRect</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (rect_t *nativeObj)</td></tr>
<tr class="separator:a80aa768986a8de358a4a529d2d971f0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9881108daf0fcef6729822cf6fc9da6f"><td class="memItemLeft" align="right" valign="top"><a id="a9881108daf0fcef6729822cf6fc9da6f"></a>
static <a class="el" href="class_t_rect.html">TRect</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (const rect_t *nativeObj)</td></tr>
<tr class="separator:a9881108daf0fcef6729822cf6fc9da6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a58208692b53384c1b1c54de193dde0ec"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_t_rect.html">TRect</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_rect.html#a58208692b53384c1b1c54de193dde0ec">Create</a> (xy_t x, xy_t y, wh_t w, wh_t h)</td></tr>
<tr class="separator:a58208692b53384c1b1c54de193dde0ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:acdeeedf1e78bba788187288cc430a82f"><td class="memItemLeft" align="right" valign="top"><a id="acdeeedf1e78bba788187288cc430a82f"></a>
rect_t *&#160;</td><td class="memItemRight" valign="bottom"><b>nativeObj</b></td></tr>
<tr class="separator:acdeeedf1e78bba788187288cc430a82f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>矩形。包括一个x坐标、y坐标、宽度和高度。 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a58208692b53384c1b1c54de193dde0ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a58208692b53384c1b1c54de193dde0ec">&#9670;&nbsp;</a></span>Create()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_t_rect.html">TRect</a> TRect::Create </td>
          <td>(</td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建rect对象。</p>
<blockquote class="doxtable">
<p>主要供脚本语言使用。 </p>
</blockquote>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>x坐标。 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标。 </td></tr>
    <tr><td class="paramname">w</td><td>宽度。 </td></tr>
    <tr><td class="paramname">h</td><td>高度。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>rect对象。 </dd></dl>

</div>
</div>
<a id="a4d8fece5673f095d16ce6148c69b817c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4d8fece5673f095d16ce6148c69b817c">&#9670;&nbsp;</a></span>Destroy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TRect::Destroy </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>销毁rect对象。</p>
<blockquote class="doxtable">
<p>主要供脚本语言使用。 </p>
</blockquote>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ab646b7cab0305a5e75cbe7d4c4c97e36"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab646b7cab0305a5e75cbe7d4c4c97e36">&#9670;&nbsp;</a></span>GetH()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wh_t TRect::GetH </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>高度。 </p>

</div>
</div>
<a id="a31ee91aae879a629ad590f1e47c0b8ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a31ee91aae879a629ad590f1e47c0b8ee">&#9670;&nbsp;</a></span>GetW()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wh_t TRect::GetW </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>宽度。 </p>

</div>
</div>
<a id="a9cc205c171035f79f00570531b5047fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9cc205c171035f79f00570531b5047fa">&#9670;&nbsp;</a></span>GetX()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">xy_t TRect::GetX </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>x坐标。 </p>

</div>
</div>
<a id="a939ed8acb2164f5c36c24df11a2167ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a939ed8acb2164f5c36c24df11a2167ae">&#9670;&nbsp;</a></span>GetY()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">xy_t TRect::GetY </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>y坐标。 </p>

</div>
</div>
<a id="ac5098b9e4d7d0ec58b1b1924a79c2a3a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac5098b9e4d7d0ec58b1b1924a79c2a3a">&#9670;&nbsp;</a></span>Set()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_t_rect.html">TRect</a> TRect::Set </td>
          <td>(</td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置rect对象的xywh。</p>
<blockquote class="doxtable">
<p>主要供脚本语言使用。 </p>
</blockquote>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>x坐标。 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标。 </td></tr>
    <tr><td class="paramname">w</td><td>宽度。 </td></tr>
    <tr><td class="paramname">h</td><td>高度。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>rect对象。 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>output/<a class="el" href="awtk__cpp_8hpp_source.html">awtk_cpp.hpp</a></li>
<li>output/awtk_cpp.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
